@namespace BlazorDatasheet.Render.DefaultComponents
@using BlazorDatasheet.Core.Edit
@inherits BaseRenderer

<div style="display: flex; flex-direction: row; justify-content: space-between; width:100%;">
    <div style="overflow: hidden;">
        @(Cell.Value?.ToString())
    </div>
    <button tabindex="-1" class="dropper" @onclick="() => this.RequestEdit(true, EditEntryMode.Mouse)">
        @CaretIcon
    </button>
</div>

@code {
    // Caret icon from HeroIcons.com
    public static RenderFragment CaretIcon = __builder =>
    {
        <svg xmlns="http://www.w3.org/2000/svg" style="width:14px;height: 14px;" viewBox="0 0 20 20" fill="currentColor">
            <path fill-rule="evenodd" d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z" clip-rule="evenodd"/>
        </svg>
    };

}